Integrand size = 23, antiderivative size = 195 \[ \int \frac {a+b \arctan (c x)}{x (d+i c d x)^3} \, dx=\frac {i b}{8 d^3 (i-c x)^2}+\frac {5 b}{8 d^3 (i-c x)}-\frac {5 b \arctan (c x)}{8 d^3}-\frac {a+b \arctan (c x)}{2 d^3 (i-c x)^2}+\frac {i (a+b \arctan (c x))}{d^3 (i-c x)}+\frac {a \log (x)}{d^3}+\frac {(a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )}{d^3}+\frac {i b \operatorname {PolyLog}(2,-i c x)}{2 d^3}-\frac {i b \operatorname {PolyLog}(2,i c x)}{2 d^3}+\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{2 d^3} \]
[Out]
Time = 0.17 (sec) , antiderivative size = 195, normalized size of antiderivative = 1.00, number of steps used = 18, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.435, Rules used = {4996, 4940, 2438, 4972, 641, 46, 209, 4964, 2449, 2352} \[ \int \frac {a+b \arctan (c x)}{x (d+i c d x)^3} \, dx=\frac {i (a+b \arctan (c x))}{d^3 (-c x+i)}-\frac {a+b \arctan (c x)}{2 d^3 (-c x+i)^2}+\frac {\log \left (\frac {2}{1+i c x}\right ) (a+b \arctan (c x))}{d^3}+\frac {a \log (x)}{d^3}-\frac {5 b \arctan (c x)}{8 d^3}+\frac {i b \operatorname {PolyLog}(2,-i c x)}{2 d^3}-\frac {i b \operatorname {PolyLog}(2,i c x)}{2 d^3}+\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2}{i c x+1}\right )}{2 d^3}+\frac {5 b}{8 d^3 (-c x+i)}+\frac {i b}{8 d^3 (-c x+i)^2} \]
[In]
[Out]
Rule 46
Rule 209
Rule 641
Rule 2352
Rule 2438
Rule 2449
Rule 4940
Rule 4964
Rule 4972
Rule 4996
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {a+b \arctan (c x)}{d^3 x}+\frac {c (a+b \arctan (c x))}{d^3 (-i+c x)^3}+\frac {i c (a+b \arctan (c x))}{d^3 (-i+c x)^2}-\frac {c (a+b \arctan (c x))}{d^3 (-i+c x)}\right ) \, dx \\ & = \frac {\int \frac {a+b \arctan (c x)}{x} \, dx}{d^3}+\frac {(i c) \int \frac {a+b \arctan (c x)}{(-i+c x)^2} \, dx}{d^3}+\frac {c \int \frac {a+b \arctan (c x)}{(-i+c x)^3} \, dx}{d^3}-\frac {c \int \frac {a+b \arctan (c x)}{-i+c x} \, dx}{d^3} \\ & = -\frac {a+b \arctan (c x)}{2 d^3 (i-c x)^2}+\frac {i (a+b \arctan (c x))}{d^3 (i-c x)}+\frac {a \log (x)}{d^3}+\frac {(a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )}{d^3}+\frac {(i b) \int \frac {\log (1-i c x)}{x} \, dx}{2 d^3}-\frac {(i b) \int \frac {\log (1+i c x)}{x} \, dx}{2 d^3}+\frac {(i b c) \int \frac {1}{(-i+c x) \left (1+c^2 x^2\right )} \, dx}{d^3}+\frac {(b c) \int \frac {1}{(-i+c x)^2 \left (1+c^2 x^2\right )} \, dx}{2 d^3}-\frac {(b c) \int \frac {\log \left (\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^3} \\ & = -\frac {a+b \arctan (c x)}{2 d^3 (i-c x)^2}+\frac {i (a+b \arctan (c x))}{d^3 (i-c x)}+\frac {a \log (x)}{d^3}+\frac {(a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )}{d^3}+\frac {i b \operatorname {PolyLog}(2,-i c x)}{2 d^3}-\frac {i b \operatorname {PolyLog}(2,i c x)}{2 d^3}+\frac {(i b) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+i c x}\right )}{d^3}+\frac {(i b c) \int \frac {1}{(-i+c x)^2 (i+c x)} \, dx}{d^3}+\frac {(b c) \int \frac {1}{(-i+c x)^3 (i+c x)} \, dx}{2 d^3} \\ & = -\frac {a+b \arctan (c x)}{2 d^3 (i-c x)^2}+\frac {i (a+b \arctan (c x))}{d^3 (i-c x)}+\frac {a \log (x)}{d^3}+\frac {(a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )}{d^3}+\frac {i b \operatorname {PolyLog}(2,-i c x)}{2 d^3}-\frac {i b \operatorname {PolyLog}(2,i c x)}{2 d^3}+\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{2 d^3}+\frac {(i b c) \int \left (-\frac {i}{2 (-i+c x)^2}+\frac {i}{2 \left (1+c^2 x^2\right )}\right ) \, dx}{d^3}+\frac {(b c) \int \left (-\frac {i}{2 (-i+c x)^3}+\frac {1}{4 (-i+c x)^2}-\frac {1}{4 \left (1+c^2 x^2\right )}\right ) \, dx}{2 d^3} \\ & = \frac {i b}{8 d^3 (i-c x)^2}+\frac {5 b}{8 d^3 (i-c x)}-\frac {a+b \arctan (c x)}{2 d^3 (i-c x)^2}+\frac {i (a+b \arctan (c x))}{d^3 (i-c x)}+\frac {a \log (x)}{d^3}+\frac {(a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )}{d^3}+\frac {i b \operatorname {PolyLog}(2,-i c x)}{2 d^3}-\frac {i b \operatorname {PolyLog}(2,i c x)}{2 d^3}+\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{2 d^3}-\frac {(b c) \int \frac {1}{1+c^2 x^2} \, dx}{8 d^3}-\frac {(b c) \int \frac {1}{1+c^2 x^2} \, dx}{2 d^3} \\ & = \frac {i b}{8 d^3 (i-c x)^2}+\frac {5 b}{8 d^3 (i-c x)}-\frac {5 b \arctan (c x)}{8 d^3}-\frac {a+b \arctan (c x)}{2 d^3 (i-c x)^2}+\frac {i (a+b \arctan (c x))}{d^3 (i-c x)}+\frac {a \log (x)}{d^3}+\frac {(a+b \arctan (c x)) \log \left (\frac {2}{1+i c x}\right )}{d^3}+\frac {i b \operatorname {PolyLog}(2,-i c x)}{2 d^3}-\frac {i b \operatorname {PolyLog}(2,i c x)}{2 d^3}+\frac {i b \operatorname {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{2 d^3} \\ \end{align*}
Time = 0.19 (sec) , antiderivative size = 162, normalized size of antiderivative = 0.83 \[ \int \frac {a+b \arctan (c x)}{x (d+i c d x)^3} \, dx=\frac {\frac {5 b}{i-c x}+\frac {i b}{(-i+c x)^2}-5 b \arctan (c x)-\frac {4 (a+b \arctan (c x))}{(-i+c x)^2}-\frac {8 i (a+b \arctan (c x))}{-i+c x}+8 a \log (x)+8 (a+b \arctan (c x)) \log \left (\frac {2 i}{i-c x}\right )+4 i b \operatorname {PolyLog}(2,-i c x)-4 i b \operatorname {PolyLog}(2,i c x)+4 i b \operatorname {PolyLog}\left (2,\frac {i+c x}{-i+c x}\right )}{8 d^3} \]
[In]
[Out]
Time = 1.41 (sec) , antiderivative size = 261, normalized size of antiderivative = 1.34
method | result | size |
derivativedivides | \(\frac {a \ln \left (c x \right )}{d^{3}}-\frac {a}{2 d^{3} \left (c x -i\right )^{2}}-\frac {i a}{d^{3} \left (c x -i\right )}-\frac {a \ln \left (c^{2} x^{2}+1\right )}{2 d^{3}}-\frac {i a \arctan \left (c x \right )}{d^{3}}+\frac {b \left (\arctan \left (c x \right ) \ln \left (c x \right )-\frac {\arctan \left (c x \right )}{2 \left (c x -i\right )^{2}}-\frac {i \arctan \left (c x \right )}{c x -i}-\arctan \left (c x \right ) \ln \left (c x -i\right )-\frac {5 \arctan \left (c x \right )}{8}+\frac {i}{8 \left (c x -i\right )^{2}}-\frac {5}{8 \left (c x -i\right )}-\frac {i \left (\operatorname {dilog}\left (-i \left (c x +i\right )\right )+\ln \left (c x \right ) \ln \left (-i \left (c x +i\right )\right )\right )}{2}+\frac {i \left (\left (\ln \left (c x \right )-\ln \left (-i c x \right )\right ) \ln \left (-i \left (-c x +i\right )\right )-\operatorname {dilog}\left (-i c x \right )\right )}{2}+\frac {i \left (\operatorname {dilog}\left (-\frac {i \left (c x +i\right )}{2}\right )+\ln \left (c x -i\right ) \ln \left (-\frac {i \left (c x +i\right )}{2}\right )\right )}{2}-\frac {i \ln \left (c x -i\right )^{2}}{4}\right )}{d^{3}}\) | \(261\) |
default | \(\frac {a \ln \left (c x \right )}{d^{3}}-\frac {a}{2 d^{3} \left (c x -i\right )^{2}}-\frac {i a}{d^{3} \left (c x -i\right )}-\frac {a \ln \left (c^{2} x^{2}+1\right )}{2 d^{3}}-\frac {i a \arctan \left (c x \right )}{d^{3}}+\frac {b \left (\arctan \left (c x \right ) \ln \left (c x \right )-\frac {\arctan \left (c x \right )}{2 \left (c x -i\right )^{2}}-\frac {i \arctan \left (c x \right )}{c x -i}-\arctan \left (c x \right ) \ln \left (c x -i\right )-\frac {5 \arctan \left (c x \right )}{8}+\frac {i}{8 \left (c x -i\right )^{2}}-\frac {5}{8 \left (c x -i\right )}-\frac {i \left (\operatorname {dilog}\left (-i \left (c x +i\right )\right )+\ln \left (c x \right ) \ln \left (-i \left (c x +i\right )\right )\right )}{2}+\frac {i \left (\left (\ln \left (c x \right )-\ln \left (-i c x \right )\right ) \ln \left (-i \left (-c x +i\right )\right )-\operatorname {dilog}\left (-i c x \right )\right )}{2}+\frac {i \left (\operatorname {dilog}\left (-\frac {i \left (c x +i\right )}{2}\right )+\ln \left (c x -i\right ) \ln \left (-\frac {i \left (c x +i\right )}{2}\right )\right )}{2}-\frac {i \ln \left (c x -i\right )^{2}}{4}\right )}{d^{3}}\) | \(261\) |
parts | \(\frac {a \ln \left (x \right )}{d^{3}}-\frac {a}{2 d^{3} \left (-c x +i\right )^{2}}+\frac {i a}{d^{3} \left (-c x +i\right )}-\frac {a \ln \left (c^{2} x^{2}+1\right )}{2 d^{3}}-\frac {i a \arctan \left (c x \right )}{d^{3}}+\frac {b \left (\arctan \left (c x \right ) \ln \left (c x \right )-\frac {\arctan \left (c x \right )}{2 \left (c x -i\right )^{2}}-\frac {i \arctan \left (c x \right )}{c x -i}-\arctan \left (c x \right ) \ln \left (c x -i\right )-\frac {5 \arctan \left (c x \right )}{8}+\frac {i}{8 \left (c x -i\right )^{2}}-\frac {5}{8 \left (c x -i\right )}-\frac {i \left (\operatorname {dilog}\left (-i \left (c x +i\right )\right )+\ln \left (c x \right ) \ln \left (-i \left (c x +i\right )\right )\right )}{2}+\frac {i \left (\left (\ln \left (c x \right )-\ln \left (-i c x \right )\right ) \ln \left (-i \left (-c x +i\right )\right )-\operatorname {dilog}\left (-i c x \right )\right )}{2}+\frac {i \left (\operatorname {dilog}\left (-\frac {i \left (c x +i\right )}{2}\right )+\ln \left (c x -i\right ) \ln \left (-\frac {i \left (c x +i\right )}{2}\right )\right )}{2}-\frac {i \ln \left (c x -i\right )^{2}}{4}\right )}{d^{3}}\) | \(261\) |
risch | \(\frac {i b \operatorname {dilog}\left (\frac {1}{2}-\frac {i c x}{2}\right )}{2 d^{3}}-\frac {i b \ln \left (i c x +1\right )}{2 d^{3} \left (i c x +1\right )}+\frac {i b \ln \left (-i c x +1\right ) c^{2} x^{2}}{16 d^{3} \left (-i c x -1\right )^{2}}-\frac {i a \arctan \left (c x \right )}{d^{3}}+\frac {i \ln \left (\frac {1}{2}-\frac {i c x}{2}\right ) \ln \left (\frac {1}{2}+\frac {i c x}{2}\right ) b}{2 d^{3}}-\frac {i b \ln \left (i c x +1\right )}{4 d^{3} \left (i c x +1\right )^{2}}+\frac {a \ln \left (-i c x \right )}{d^{3}}+\frac {a}{2 d^{3} \left (-i c x -1\right )^{2}}-\frac {a}{d^{3} \left (-i c x -1\right )}+\frac {5 i b \ln \left (c^{2} x^{2}+1\right )}{32 d^{3}}-\frac {b \ln \left (-i c x +1\right ) c x}{4 d^{3} \left (-i c x -1\right )}+\frac {i b \ln \left (i c x +1\right )^{2}}{4 d^{3}}-\frac {i \operatorname {dilog}\left (-i c x +1\right ) b}{2 d^{3}}+\frac {3 i b \ln \left (-i c x +1\right )}{16 d^{3} \left (-i c x -1\right )^{2}}-\frac {i b}{8 d^{3} \left (i c x +1\right )^{2}}-\frac {i b}{2 d^{3} \left (i c x +1\right )}+\frac {b \ln \left (-i c x +1\right ) c x}{8 d^{3} \left (-i c x -1\right )^{2}}-\frac {a \ln \left (c^{2} x^{2}+1\right )}{2 d^{3}}-\frac {i b \ln \left (\frac {1}{2}+\frac {i c x}{2}\right ) \ln \left (-i c x +1\right )}{2 d^{3}}+\frac {i b \operatorname {dilog}\left (i c x +1\right )}{2 d^{3}}-\frac {i b \ln \left (-i c x +1\right )}{4 d^{3} \left (-i c x -1\right )}-\frac {5 b \arctan \left (c x \right )}{16 d^{3}}+\frac {i b}{8 d^{3} \left (-i c x -1\right )}\) | \(429\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 201, normalized size of antiderivative = 1.03 \[ \int \frac {a+b \arctan (c x)}{x (d+i c d x)^3} \, dx=-\frac {2 \, {\left (8 i \, a + 5 \, b\right )} c x + 8 \, {\left (i \, b c^{2} x^{2} + 2 \, b c x - i \, b\right )} {\rm Li}_2\left (\frac {c x + i}{c x - i} + 1\right ) - 16 \, {\left (a c^{2} x^{2} - 2 i \, a c x - a\right )} \log \left (x\right ) - 4 \, {\left (2 \, b c x - 3 i \, b\right )} \log \left (-\frac {c x + i}{c x - i}\right ) + 5 \, {\left (i \, b c^{2} x^{2} + 2 \, b c x - i \, b\right )} \log \left (\frac {c x + i}{c}\right ) + {\left ({\left (16 \, a - 5 i \, b\right )} c^{2} x^{2} + 2 \, {\left (-16 i \, a - 5 \, b\right )} c x - 16 \, a + 5 i \, b\right )} \log \left (\frac {c x - i}{c}\right ) + 24 \, a - 12 i \, b}{16 \, {\left (c^{2} d^{3} x^{2} - 2 i \, c d^{3} x - d^{3}\right )}} \]
[In]
[Out]
Exception generated. \[ \int \frac {a+b \arctan (c x)}{x (d+i c d x)^3} \, dx=\text {Exception raised: RecursionError} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 406 vs. \(2 (151) = 302\).
Time = 0.29 (sec) , antiderivative size = 406, normalized size of antiderivative = 2.08 \[ \int \frac {a+b \arctan (c x)}{x (d+i c d x)^3} \, dx=\frac {2 \, {\left (-8 i \, a - 5 \, b\right )} c x + 4 \, {\left (-i \, b c^{2} x^{2} - 2 \, b c x + i \, b\right )} \arctan \left (c x\right )^{2} - {\left (i \, b c^{2} x^{2} + 2 \, b c x - i \, b\right )} \log \left (c^{2} x^{2} + 1\right )^{2} - 4 \, {\left (b c^{2} x^{2} - 2 i \, b c x - b\right )} \arctan \left (c x\right ) \log \left (\frac {1}{4} \, c^{2} x^{2} + \frac {1}{4}\right ) + 16 \, {\left (b c^{2} x^{2} - 2 i \, b c x - b\right )} \arctan \left (c x\right ) \log \left (c x\right ) - {\left ({\left (16 i \, a + 5 \, b\right )} c^{2} x^{2} + 2 \, {\left (16 \, a + 3 i \, b\right )} c x - 16 i \, a + 19 \, b\right )} \arctan \left (c x\right ) + 5 \, {\left (b c^{2} x^{2} - 2 i \, b c x - b\right )} \arctan \left (c x, -1\right ) + 8 \, {\left (-i \, b c^{2} x^{2} - 2 \, b c x + i \, b\right )} {\rm Li}_2\left (i \, c x + 1\right ) + 8 \, {\left (i \, b c^{2} x^{2} + 2 \, b c x - i \, b\right )} {\rm Li}_2\left (\frac {1}{2} i \, c x + \frac {1}{2}\right ) + 8 \, {\left (i \, b c^{2} x^{2} + 2 \, b c x - i \, b\right )} {\rm Li}_2\left (-i \, c x + 1\right ) - 2 \, {\left (2 \, {\left (\pi b + 2 \, a\right )} c^{2} x^{2} - 4 \, {\left (i \, \pi b + 2 i \, a\right )} c x - 2 \, \pi b - {\left (i \, b c^{2} x^{2} + 2 \, b c x - i \, b\right )} \log \left (\frac {1}{4} \, c^{2} x^{2} + \frac {1}{4}\right ) - 4 \, a\right )} \log \left (c^{2} x^{2} + 1\right ) + 16 \, {\left (a c^{2} x^{2} - 2 i \, a c x - a\right )} \log \left (x\right ) - 24 \, a + 12 i \, b}{16 \, {\left (c^{2} d^{3} x^{2} - 2 i \, c d^{3} x - d^{3}\right )}} \]
[In]
[Out]
\[ \int \frac {a+b \arctan (c x)}{x (d+i c d x)^3} \, dx=\int { \frac {b \arctan \left (c x\right ) + a}{{\left (i \, c d x + d\right )}^{3} x} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {a+b \arctan (c x)}{x (d+i c d x)^3} \, dx=\int \frac {a+b\,\mathrm {atan}\left (c\,x\right )}{x\,{\left (d+c\,d\,x\,1{}\mathrm {i}\right )}^3} \,d x \]
[In]
[Out]